package cate.game.train.equip.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTrain;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "装备铭刻 の 请求")
@OperationSetter(GDOperation.EQUIP_RUBBING)
public class EquipRubbingReq implements MsgInput {
    @NoteField(value = "装备ID")
    public String equipUid;

    @NoteField(value = "英雄ID", detail = "如果是英雄身上的装备还需要传英雄id")
    public String heroUid;

    @NoteField(value = "位置")
    public byte pos;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        game.train.equip.rubbingEquip(cc.getRole(), heroUid, equipUid, pos);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.EQUIP_RUBBING_REQ;
    }
}
